﻿using IOA.MES.DataAccess.Enum;

namespace IOA.MES.DataAccess.VModel
{
    /// <summary>
    /// 组件过站记录
    /// </summary>
    public class VProductViaSiteRecord : BaseVModel
    {
        private string _dutyName = string.Empty;
        private string _machineName = string.Empty;
        private string _code = string.Empty;
        private string _orderNo = string.Empty;
        private string _workOrderNo = string.Empty;
        private string _boxCode;
        private string _images;
        private string _qLevel = string.Empty;
        private string _badCode = string.Empty;
        private string _badReason = string.Empty;
        private string _badCoordinates = string.Empty;
        private string _cellFeature;
        private string _componentType;
        private string _workshopCode;
        private string _workOrderName;
        private string _topPosition;
        private string _lineName;
        private string _currentLevel;
        private string _nameplateModel;
        private string _badTypeCode;
        private string _badTypeName;
        private string _verifyCode;

        #region Public Property
        /// <summary>
        /// 过站类型
        /// </summary>
        public SiteType SiteType { get; set; }
        public string CNSiteType { get { return !System.Enum.IsDefined(typeof(SiteType), SiteType) ? string.Empty : EnumConvert.ToDesc(SiteType); } }

        /// <summary>
        /// 过站类型
        /// </summary>
        public ViaSiteType ViaSiteType { get; set; }

        ///<Summary>
        /// 班次ID
        ///</Summary>
        public int DutyId { get; set; }

        ///<Summary>
        /// 班次名称
        ///</Summary>
        public string DutyName
        {
            get { return string.IsNullOrWhiteSpace(_dutyName) ? string.Empty : _dutyName; }
            set { _dutyName = value; }
        }

        ///<Summary>
        /// 设备ID
        ///</Summary>
        public int MachineId { get; set; }

        ///<Summary>
        /// 设备名称
        ///</Summary>
        public string MachineName
        {
            get { return string.IsNullOrWhiteSpace(_machineName) ? string.Empty : _machineName; }
            set { _machineName = value; }
        }

        ///<Summary>
        /// 流水线ID
        ///</Summary>
        public int LineId { get; set; }

        ///<Summary>
        /// 流水线名称
        ///</Summary>
        public string LineName
        {
            get { return string.IsNullOrWhiteSpace(_lineName) ? string.Empty : _lineName; }
            set { _lineName = value; }
        }

        ///<Summary>
        /// 组件条码
        ///</Summary>
        public string Code
        {
            get { return string.IsNullOrWhiteSpace(_code) ? string.Empty : _code; }
            set { _code = value; }
        }

        ///<Summary>
        /// 订单号
        ///</Summary>
        public string OrderNo
        {
            get { return string.IsNullOrWhiteSpace(_orderNo) ? string.Empty : _orderNo; }
            set { _orderNo = value; }
        }

        ///<Summary>
        /// 工单号
        ///</Summary>
        public string WorkOrderNo
        {
            get { return string.IsNullOrWhiteSpace(_workOrderNo) ? string.Empty : _workOrderNo; }
            set { _workOrderNo = value; }
        }

        ///<Summary>
        /// 车间代码
        ///</Summary>
        public string WorkshopCode
        {
            get { return string.IsNullOrWhiteSpace(_workshopCode) ? string.Empty : _workshopCode; }
            set { _workshopCode = value; }
        }

        ///<Summary>
        /// 车间名称
        ///</Summary>
        public string WorkshopName
        {
            get { return string.IsNullOrWhiteSpace(_workOrderName) ? string.Empty : _workOrderName; }
            set { _workOrderName = value; }
        }

        ///<Summary>
        /// 接线盒条码
        ///</Summary>
        public string BoxCode
        {
            get { return string.IsNullOrWhiteSpace(_boxCode) ? string.Empty : _boxCode; }
            set { _boxCode = value; }
        }

        /// <summary>
        /// 层压位置
        /// </summary>
        public string TopPosition
        {
            get { return string.IsNullOrWhiteSpace(_topPosition) ? string.Empty : _topPosition; }
            set { _topPosition = value; }
        }

        /// <summary>
        /// 功率档
        /// </summary>
        public decimal PowerLevel { get; set; }

        ///<Summary>
        /// 电流档
        ///</Summary>
        public string CurrentLevel
        {
            get { return string.IsNullOrWhiteSpace(_currentLevel) ? string.Empty : _currentLevel; }
            set { _currentLevel = value; }
        }

        /// <summary>
        /// 铭牌型号
        /// </summary>
        public string NameplateModel
        {
            get { return string.IsNullOrWhiteSpace(_nameplateModel) ? string.Empty : _nameplateModel; }
            set { _nameplateModel = value; }
        }

        ///<Summary>
        /// 是否锁定
        ///</Summary>
        public bool IsLock { get; set; }

        ///<Summary>
        /// 图片列表
        ///</Summary>
        public string Images
        {
            get { return string.IsNullOrWhiteSpace(_images) ? string.Empty : _images; }
            set { _images = value; }
        }

        ///<Summary>
        /// 组件等级
        ///</Summary>
        public string QLevel
        {
            get { return string.IsNullOrWhiteSpace(_qLevel) ? string.Empty : _qLevel; }
            set { _qLevel = value; }
        }

        ///<Summary>
        /// 异常分类代码
        ///</Summary>
        public string BadTypeCode
        {
            get { return string.IsNullOrWhiteSpace(_badTypeCode) ? string.Empty : _badTypeCode; }
            set { _badTypeCode = value; }
        }

        ///<Summary>
        /// 异常分类原因
        ///</Summary>
        public string BadTypeName
        {
            get { return string.IsNullOrWhiteSpace(_badTypeName) ? string.Empty : _badTypeName; }
            set { _badTypeName = value; }
        }

        ///<Summary>
        /// 异常代码
        ///</Summary>
        public string BadCode
        {
            get { return string.IsNullOrWhiteSpace(_badCode) ? string.Empty : _badCode; }
            set { _badCode = value; }
        }

        ///<Summary>
        /// 异常原因
        ///</Summary>
        public string BadReason
        {
            get { return string.IsNullOrWhiteSpace(_badReason) ? string.Empty : _badReason; }
            set { _badReason = value; }
        }

        ///<Summary>
        /// 异常数量
        ///</Summary>
        public int BadCount { get; set; }

        ///<Summary>
        /// 异常坐标
        ///</Summary>
        public string BadCoordinates
        {
            get { return string.IsNullOrWhiteSpace(_badCoordinates) ? string.Empty : _badCoordinates; }
            set { _badCoordinates = value; }
        }

        ///<Summary>
        /// 防伪码
        ///</Summary>
        public string VerifyCode
        {
            get { return string.IsNullOrWhiteSpace(_verifyCode) ? string.Empty : _verifyCode; }
            set { _verifyCode = value; }
        }

        /// <summary>
        /// 组件类型
        /// </summary>
        public string ComponentType
        {
            get { return string.IsNullOrWhiteSpace(_componentType) ? string.Empty : _componentType; }
            set { _componentType = value; }
        }

        /// <summary>
        /// 电池片特性
        /// </summary>
        public string CellFeature
        {
            get { return string.IsNullOrWhiteSpace(_cellFeature) ? string.Empty : _cellFeature; }
            set { _cellFeature = value; }
        }
        #endregion
    }
}
